<form id="company-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('建筑名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" value="{$row.name}" disabled />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('建筑地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control"
                value="{$row.prov}{$row.city}{$row.region}{$row.street}{$row.address}" disabled />
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('选择公司')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_id" data-rule="required" data-source="company/index" class="form-control selectpage"
                name="row[company_id]" type="text" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('已关联公司')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>{:__('公司名称')}</th>
                            <!-- <th>{:__('排序')}</th> -->
                            <th>{:__('关联时间')}</th>
                            <th>{:__('操作')}</th>
                        </tr>
                    </thead>
                    <tbody>
                        {foreach name="companies" item="vo"}
                        <tr>
                            <td>{$vo.company_name}</td>
                            <!-- <td>{$vo.weigh}</td> -->
                            <td>{$vo.createtime|datetime}</td>
                            <td>
                                <a href="javascript:;" class="btn btn-xs btn-danger btn-delone"
                                    data-id="{$vo.id}">{:__('Delete')}</a>
                            </td>
                        </tr>
                        {/foreach}
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>